<!--
 * @Author: Damon Liu
 * @Date: 2025-04-29 15:51:44
 * @LastEditors: Damon Liu
 * @LastEditTime: 2025-04-29 17:40:37
 * @Description: 
-->
<template>
    <a-modal v-model:open="open" title="日程详情" :footer="null">
        <a-form :model="form" :rules="rules" >
            <a-form-item label="标题" name="title">
                {{  schedule.title  }}
            </a-form-item>
            <a-form-item label="描述" name="description">
                {{  schedule.description  }}
            </a-form-item>
            <a-form-item label="开始时间" name="start">
                {{  schedule.start  }}
            </a-form-item>
            <a-form-item label="结束时间" name="end">
                {{  schedule.end  }}
            </a-form-item>
            <a-form-item label="提醒时间" name="reminder">
                {{  schedule.reminder  }}
            </a-form-item>
            <a-form-item label="类型" name="type">
                <a-tag :color="EVENT_TYPES[schedule.type?.toUpperCase()]?.color || '#1890ff'">{{ EVENT_TYPES[schedule.type?.toUpperCase()]?.text || '日常' }}</a-tag>
            </a-form-item>
        </a-form>
    </a-modal>
</template>

<script setup>
import { ref } from 'vue'
import { EVENT_TYPES } from '~/utils/enums'
const schedule = ref({})

const open = ref(false)

const show = (_schedule) => {
    schedule.value = _schedule
    open.value = true
}

defineExpose({
    show
})

</script>

<style scoped>

</style>


